package com.shopping.dao;

import com.shopping.bean.Cart;
import com.shopping.bean.Category;
import com.shopping.util.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface CartDao {
    int addCart(@Param("cart") Cart cart);
    int editCart(@Param("cart")Cart cart);
    int deleteCart(@Param("cart")Cart cart);
    List<Cart> getList(@Param("page") Page page, @Param("text")String text);
    Category getCategoryById(@Param("id")int id);
    int getCount(@Param("text")String text);
    Cart getCart(@Param("cart")Cart cart);
    List<Cart> getCarts(@Param("userid") int  userid );


}